<template>
  <el-card>
    chapter index
    <el-form>
      <el-form-item>
        <el-button @click="previous($parent)">上一步</el-button>
        <el-button
          :disabled="saveBtnDisabled"
          type="primary"
          @click="next($parent)"
          >保存并下一步</el-button
        >
      </el-form-item>
    </el-form>
  </el-card>
</template>
<script setup lang="ts">
import { ref } from 'vue'
//import { useRouter } from 'vue-router'

//const $router = useRouter()

const saveBtnDisabled = ref<boolean>(false)

// console.log($router)
//const active = ref(1)

const previous = ($parent: any) => {
  $parent.$parent.active = 0
  console.log($parent.$parent)
}

const next = ($parent: any) => {
  $parent.$parent.active = 2
  console.log($parent.$parent)
}
</script>

<style scoped></style>
